import {
  promotionList,
  h5SharePromotionList,
  h5PromotionList,
  addPromotionLink,
  getPromotionInfo,
  setLinkStatus,
  getPromotionPage,
  delPromotionInfo,
  updatePromotionInfo,
  getWxQrCode
} from '@/services/H5Promotion'

export default () => {
  const PromotionList = <T>(params: T) => {
    return promotionList(params)
  }

  const H5SharePromotionList = <T>(params: T) => {
    return h5SharePromotionList(params)
  }

  const H5PromotionList = <T>(params: T) => {
    return h5PromotionList(params)
  }

  const AddPromotionLink = <T>(data: T) => {
    return addPromotionLink(data)
  }

  const GetPromotionInfo = <T>(params: T) => {
    return getPromotionInfo(params)
  }

  const SetLinkStatus = <T>(params: T) => {
    return setLinkStatus(params)
  }

  const GetPromotionPage = <T>(params: T) => {
    return getPromotionPage(params)
  }

  const DelPromotionInfo = <T>(params: T) => {
    return delPromotionInfo(params)
  }

  const UpdatePromotionInfo = <T>(data: T) => {
    return updatePromotionInfo(data)
  }

  const GetWxQrCode = <T>(params: T) => {
    return getWxQrCode(params)
  }

  return {
    PromotionList,
    H5SharePromotionList,
    H5PromotionList,
    AddPromotionLink,
    GetPromotionInfo,
    SetLinkStatus,
    GetPromotionPage,
    DelPromotionInfo,
    UpdatePromotionInfo,
    GetWxQrCode
  }
}
